You should first initialize SDK resources.
You can refer to the following sample codes to initialize SDK resources and release SDK resources.
if __name__ == "__main__":
MvCamera.MV_CC_Initialize()
MvCamera.MV_CC_Finalize()
-
Call MV_CC_Initialize() to initialize the SDK running environment This operation requests and allocates the necessary system resources in advance, ensuring that the SDK can run reliably.
-
After initializing SDK resources, you can call other APIs to initialize the camera or frame grabber, configure parameters, get images, and process images.
-
After all these operations, you can call MV_CC_Finalize() to release SDK resources.
- Attention
- In a single process, you can call MV_CC_Initialize() and MV_CC_Finalize() each for once.